#include "stinger.h"
#include <iostream>
using namespace std;



int main() {

    pmem_pool_allocator allocator("pmem_map_file", 10 * MB);
    allocator.init();
    //printf("%p\n", allocator.get_base());

    //分配的第一个边块的起始地址其实就是整个NVM池的起始地址
    // edge_block * eb1 = (edge_block *)allocator.alloc(sizeof(edge_block));
    // eb1->edges[0].neighbor = 1;
    // eb1->edges[0].weight = 1;
    // eb1->edges[0].timeFirst = 1;
    // eb1->edges[0].timeRecent = 1;

    // eb1->edge_type = 1;
    // eb1->edge_num = 1;
    // clwb(eb1);

    // edge_block * eb1 = (edge_block *)allocator.get_base();
    // cout << eb1->edges[0].neighbor << endl;
    // cout << eb1->edges[0].weight << endl;
    // cout << eb1->edges[0].timeFirst << endl;
    // cout << eb1->edges[0].timeRecent << endl;


    // cout << sizeof(edge) << endl;
    // cout << sizeof(edge_block) << endl;



    return 0;
}

// g++ stinger.cpp -lpmem -o stinger